-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: cleanup dead code and some bug fixes (#167)
* refactor: remove waitlist router * feat: remove signup page * chore: remove allow sigin in * fix: double redirect * refactor: progress bar * chore: remove waitlist env * chore: * refactor: remove waitlist table * feat: add public bucket * feat: add bucket url * feat: use bucket url * feat: use image patterns * refactor: extract get compnay * refactor: remove duplicate form * feat: update form
- Loading branch information
Showing
28 changed files
with
162 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
prisma/migrations/20240304075022_remove_waitlist_table/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the `WaitlistUser` table. If the table is not empty, all the data it contains will be lost. | ||
*/ | ||
-- DropTable | ||
DROP TABLE "WaitlistUser"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 4 additions & 14 deletions
18
src/app/(authenticated)/(dashboard)/[publicId]/settings/company/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,10 @@ | ||
import CompanyForm from "@/components/onboarding/company-form"; | ||
import { withServerSession } from "@/server/auth"; | ||
import { getCompany } from "@/server/company"; | ||
import { CompanyForm } from "@/components/onboarding/company-form"; | ||
import { api } from "@/trpc/server"; | ||
|
||
const CompanySettingsPage = async () => { | ||
const session = await withServerSession(); | ||
const user = session.user; | ||
const data = await api.company.getCompany.query(); | ||
|
||
const companyResponse = await getCompany(user.id, user.companyId); | ||
|
||
return ( | ||
<CompanyForm | ||
companyServerResponse={companyResponse} | ||
formType="edit-company" | ||
currentUser={user} | ||
/> | ||
); | ||
return <CompanyForm data={data} type="edit" />; | ||
}; | ||
|
||
export default CompanySettingsPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { getServerAuthSession } from "@/server/auth"; | ||
import { redirect } from "next/navigation"; | ||
|
||
export default async function HomePage() { | ||
const session = await getServerAuthSession(); | ||
|
||
if (session?.user?.companyPublicId) { | ||
return redirect(`/${session.user.companyPublicId}`); | ||
} | ||
|
||
return redirect("/login"); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.