Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 45 additions & 49 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
dist-electron
release
*.local

# Editor directories and files
.vscode/.debug.env
.vscode/settings.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

#lockfile
package-lock.json
pnpm-lock.yaml
yarn.lock
/test-results/
/playwright-report/
/playwright/.cache/

# Env variables
.env
.env.production
.env.development
.env.test
.env.local
.env.development.local
.env.test.local
.env.production.local

mise.toml

# Temporary files
.tmp/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
dist-electron
release
*.local

# Editor directories and files
.vscode/.debug.env
.vscode/settings.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

#lockfile
package-lock.json
pnpm-lock.yaml
yarn.lock
/test-results/
/playwright-report/
/playwright/.cache/

# Env variables
.env.development.local
.env.test.local
.env.production.local
Comment thread
Abdul-Moiz31 marked this conversation as resolved.

mise.toml

# Temporary files
.tmp/
config.bat
52 changes: 26 additions & 26 deletions apps/web/client/src/app/_components/top-bar/user.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
'use client';

import { CurrentUserAvatar } from '@/components/ui/avatar-dropdown';
import { api } from '@/trpc/react';
import { Routes } from '@/utils/constants';
import { Button } from '@onlook/ui/button';
import Link from 'next/link';

export const AuthButton = () => {
const { data: user } = api.user.get.useQuery();
return (
<div className="flex items-center gap-3 mt-0">
{user ? (
<>
<Button variant="secondary" asChild className="rounded cursor-pointer">
<Link href={Routes.PROJECTS}>Projects</Link>
</Button>
<CurrentUserAvatar className="cursor-pointer hover:opacity-80" />
</>
) : (
<Button variant="secondary" asChild className="rounded cursor-pointer">
<Link href={Routes.LOGIN}>Sign In</Link>
</Button>
)}
</div>
);
'use client';
import { CurrentUserAvatar } from '@/components/ui/avatar-dropdown';
import { api } from '@/trpc/react';
import { Routes } from '@/utils/constants';
import { Button } from '@onlook/ui/button';
import Link from 'next/link';
export const AuthButton = () => {
const { data: user } = api.user.getOptional.useQuery();
return (
<div className="flex items-center gap-3 mt-0">
{user ? (
<>
<Button variant="secondary" asChild className="rounded cursor-pointer">
<Link href={Routes.PROJECTS}>Projects</Link>
</Button>
<CurrentUserAvatar className="cursor-pointer hover:opacity-80" />
</>
) : (
<Button variant="secondary" asChild className="rounded cursor-pointer">
<Link href={Routes.LOGIN}>Sign In</Link>
</Button>
)}
</div>
);
};
Loading