Skip to content

Commit

Permalink
Merge pull request #847 from haohao-how/dev
Browse files Browse the repository at this point in the history
UI tweaks
  • Loading branch information
bradleyayers authored Feb 5, 2025
2 parents d5689ba + b448d0a commit 4cd68b9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
6 changes: 5 additions & 1 deletion projects/app/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,12 @@ export default tseslint.config(
`**/*+api.*`, // API routes should use named exports
],
rules: {
"import/no-named-export": `error`, // The only exports should be a default for the page
"import/no-default-export": `off`,
// Ensuring that default exports are named helps improve the grepability
// of the codebase by encouraging the re-use of the same identifier for
// the module's default export at its declaration site and at its import
// sites.
"import/no-anonymous-default-export": `error`,
},
},

Expand Down
14 changes: 9 additions & 5 deletions projects/app/src/app/(sidenav)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ import { ElementRef, forwardRef, ReactNode } from "react";
import { Pressable, Text, View } from "react-native";
import { tv } from "tailwind-variants";

export const unstable_settings = {
initialRouteName: `learn`,
};

export default function SideNavLayout() {
const isAuthenticated = useAuth().data?.clientSession.serverSessionId != null;

return (
<Tabs className="flex-1 flex-col-reverse items-stretch self-stretch lg:flex-row">
<TabList className="flex-grow-0 items-center gap-4 justify-self-stretch border-t-2 border-primary-4 pt-2 pb-safe-or-2 px-safe-or-4 lg:flex-col lg:items-start lg:border-t-0 lg:px-4 lg:pt-6">
<Tabs className="flex-1 flex-col-reverse items-stretch self-stretch md:flex-row">
<TabList className="flex-grow-0 items-center gap-4 justify-self-stretch border-t-2 border-primary-4 pt-2 pb-safe-or-2 px-safe-or-4 md:flex-col md:items-start md:border-t-0 md:px-4 md:pt-6">
<Link
href="/learn"
className="hidden px-2 py-1 text-2xl font-bold tracking-wide text-primary-10 lg:flex"
className="hidden px-2 py-1 text-2xl font-bold tracking-wide text-primary-10 md:flex"
>
<Image
source={require(`@/assets/logo/logotype.svg`)}
Expand Down Expand Up @@ -75,7 +79,7 @@ export default function SideNavLayout() {

<Link
href="/login"
className="items-center rounded-md px-2 py-1 text-xl font-bold tracking-wide text-text hover:bg-primary-4 lg:self-stretch"
className="items-center rounded-md px-2 py-1 text-xl font-bold tracking-wide text-text hover:bg-primary-4 md:self-stretch"
>
{isAuthenticated ? (
<View className="size-10 rounded-full bg-[green]"></View>
Expand Down Expand Up @@ -138,7 +142,7 @@ const buttonClass = tv({
});

const buttonTextClass = tv({
base: `text-xl font-sans font-bold text-text hidden lg:flex transition-colors`,
base: `text-sm uppercase font-sans font-bold text-text hidden md:flex transition-colors`,
variants: {
isFocused: {
true: `text-primary-12`,
Expand Down
4 changes: 4 additions & 0 deletions projects/app/src/app/(sidenav)/learn/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Stack } from "expo-router";

export const unstable_settings = {
initialRouteName: `index`,
};

export default function LearnLayout() {
return (
<Stack screenOptions={{ headerShown: false }}>
Expand Down
4 changes: 3 additions & 1 deletion projects/app/src/app/(website)/company.tsx
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export default () => null;
export default function CompanyPage() {
return () => null;
}
4 changes: 2 additions & 2 deletions projects/app/src/app/(website)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { router } from "expo-router";
import { useEffect } from "react";

export default () => {
export default function NativeHomeRedirect() {
useEffect(() => {
const x = setTimeout(() => {
router.replace(`/learn`);
Expand All @@ -11,4 +11,4 @@ export default () => {
};
}, []);
return null;
};
}

0 comments on commit 4cd68b9

Please sign in to comment.