Skip to content

Commit

Permalink
udpate
Browse files Browse the repository at this point in the history
  • Loading branch information
fforres committed Nov 20, 2024
1 parent 3c42c5b commit 67f6d07
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion app/components/Navbar/MobileNavbarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const MobileNavbarItem = ({
return (
<MobileLink
key={`mobileitem-${item.content}`}
href={item.fullLink ? item.fullLink: item.link}
href={item.fullLink ? item.fullLink : item.link}
onClick={(e) => {
item.onClick?.(e);
onNavItemClick();
Expand Down
9 changes: 7 additions & 2 deletions app/components/Navbar/NavbarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export const NavbarItem = ({ item }: { item: NavbarMenuItem }) => {
key={`dropdown-${item.content}`}
className="cursor-pointer"
>
<Link to={child.fullLink ? child.fullLink: child.link} className="flex items-center">
<Link
to={child.fullLink ? child.fullLink : child.link}
className="flex items-center"
>
{child.icon}
<span>{child.content}</span>
</Link>
Expand Down Expand Up @@ -67,7 +70,9 @@ export const NavbarItem = ({ item }: { item: NavbarMenuItem }) => {
if (item.link) {
return (
<Button variant={variant} asChild>
<Link to={item.fullLink ? item.fullLink: item.link}>{item.content}</Link>
<Link to={item.fullLink ? item.fullLink : item.link}>
{item.content}
</Link>
</Button>
);
}
Expand Down
8 changes: 5 additions & 3 deletions app/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export const Navbar = () => {
const browser = Bowser.getParser(window.navigator.userAgent);
const isMobileSafari = browser.satisfies({
mobile: {
safari: '>=9',
safari: ">=9",
},
});

const { impersonation, setImpersonation } = useAuthContext();

const [impersonateModal, setImpersonateModal] = useState(false);
Expand Down Expand Up @@ -104,7 +104,9 @@ export const Navbar = () => {
{
content: "Login",
link: urls.login,
fullLink: isMobileSafari ? `x-safari-https://tickets.communityos.io/${urls.login}` : undefined,
fullLink: isMobileSafari
? `x-safari-https://tickets.communityos.io/${urls.login}`
: undefined,
variant: "secondary",
show: isAuthReady && !isLogged,
},
Expand Down
6 changes: 3 additions & 3 deletions functions/[[path]].ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-disable */
import { createPagesFunctionHandler } from '@remix-run/cloudflare-pages'
import { createPagesFunctionHandler } from "@remix-run/cloudflare-pages";

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - the server build file is generated by `remix vite:build`
// eslint-disable-next-line import/no-unresolved
import * as build from '../build/server'
import * as build from "../build/server";

export const onRequest = createPagesFunctionHandler({
build,
})
});
16 changes: 6 additions & 10 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const colors = require("tailwindcss/colors");
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");


module.exports = {
darkMode: ["class"],
Expand All @@ -27,8 +26,8 @@ module.exports = {
},
extend: {
fontFamily: {
"cal": ["Cal Sans", "sans-serif"],
"inter": ["Inter Variable", "sans-serif"],
cal: ["Cal Sans", "sans-serif"],
inter: ["Inter Variable", "sans-serif"],
},
colors: {
border: "hsl(var(--border))",
Expand Down Expand Up @@ -86,19 +85,16 @@ module.exports = {
},
},
},
plugins: [
require("tailwindcss-animate"),
addVariablesForColors
],
plugins: [require("tailwindcss-animate"), addVariablesForColors],
};

function addVariablesForColors({ addBase, theme }) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
Object.entries(allColors).map(([key, val]) => [`--${key}`, val]),
);

addBase({
":root": newVars,
});
}
}

0 comments on commit 67f6d07

Please sign in to comment.