-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Agregando una acción para correr prettier/eslint/tsc (#13)
- Loading branch information
Showing
29 changed files
with
496 additions
and
282 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# # GQL / code-generation | ||
src/api/gql/**/* | ||
src/**/*.generated.* |
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,61 @@ | ||
name: Lint and Typecheck | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
linting-and-typechecking: | ||
runs-on: ubuntu-latest | ||
name: Linting and Typechecking | ||
|
||
# Considerar Mover clone/setup/caches a un composite action 🙏 | ||
steps: | ||
- name: ⏳ Cloning repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: ⬢ Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: 📦 Download Cached Package Dependencies | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: NPM | ||
with: | ||
path: ~/.npm | ||
key: CACHE-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: 📦 Download Cached Eslint output | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: ESLINT | ||
with: | ||
path: .eslintcache | ||
key: CACHE-${{ env.cache-name }}-${{ hashFiles('.eslintcache') }} | ||
|
||
- name: 📦 Download Cached Typescript output | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: TYPESCRIPT | ||
with: | ||
path: tsconfig.tsbuildinfo | ||
key: CACHE-${{ env.cache-name }}-${{ hashFiles('tsconfig.tsbuildinfo') }} | ||
|
||
- name: 📥 Install dependencies | ||
run: npm ci --prefer-offline --no-audit --legacy-peer-deps --cache ~/.npm | ||
|
||
- name: Run Prettier | ||
run: npm run prettier:ci | ||
|
||
- name: Run Linter | ||
run: npm run lint | ||
|
||
- name: Run Typecheck | ||
run: npm run typecheck | ||
|
||
- name: Run Next Linter | ||
run: npx next lint |
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 |
---|---|---|
@@ -1 +1 @@ | ||
{} | ||
{} |
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 |
---|---|---|
@@ -1,76 +1,76 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@layer base { | ||
:root { | ||
--background: 0 0% 100%; | ||
--foreground: 222.2 84% 4.9%; | ||
|
||
--card: 0 0% 100%; | ||
--card-foreground: 222.2 84% 4.9%; | ||
|
||
--popover: 0 0% 100%; | ||
--popover-foreground: 222.2 84% 4.9%; | ||
|
||
--primary: 222.2 47.4% 11.2%; | ||
--primary-foreground: 210 40% 98%; | ||
|
||
--secondary: 210 40% 96.1%; | ||
--secondary-foreground: 222.2 47.4% 11.2%; | ||
|
||
--muted: 210 40% 96.1%; | ||
--muted-foreground: 215.4 16.3% 46.9%; | ||
|
||
--accent: 210 40% 96.1%; | ||
--accent-foreground: 222.2 47.4% 11.2%; | ||
|
||
--destructive: 0 84.2% 60.2%; | ||
--destructive-foreground: 210 40% 98%; | ||
|
||
--border: 214.3 31.8% 91.4%; | ||
--input: 214.3 31.8% 91.4%; | ||
--ring: 222.2 84% 4.9%; | ||
|
||
--radius: 0.5rem; | ||
} | ||
|
||
.dark { | ||
--background: 222.2 84% 4.9%; | ||
--foreground: 210 40% 98%; | ||
|
||
--card: 222.2 84% 4.9%; | ||
--card-foreground: 210 40% 98%; | ||
|
||
--popover: 222.2 84% 4.9%; | ||
--popover-foreground: 210 40% 98%; | ||
|
||
--primary: 210 40% 98%; | ||
--primary-foreground: 222.2 47.4% 11.2%; | ||
|
||
--secondary: 217.2 32.6% 17.5%; | ||
--secondary-foreground: 210 40% 98%; | ||
|
||
--muted: 217.2 32.6% 17.5%; | ||
--muted-foreground: 215 20.2% 65.1%; | ||
|
||
--accent: 217.2 32.6% 17.5%; | ||
--accent-foreground: 210 40% 98%; | ||
|
||
--destructive: 0 62.8% 30.6%; | ||
--destructive-foreground: 210 40% 98%; | ||
|
||
--border: 217.2 32.6% 17.5%; | ||
--input: 217.2 32.6% 17.5%; | ||
--ring: hsl(212.7,26.8%,83.9); | ||
--ring: hsl(212.7, 26.8%, 83.9); | ||
} | ||
} | ||
|
||
@layer base { | ||
* { | ||
@apply border-border; | ||
} | ||
body { | ||
@apply bg-background text-foreground; | ||
} | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ module.exports = { | |
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
}; |
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,13 +1,48 @@ | ||
import { NavBarProps } from "./types"; | ||
import { NavbarItem } from "./NavbarItem"; | ||
import { | ||
SignInButton, | ||
SignOutButton, | ||
SignedIn, | ||
SignedOut, | ||
} from "@clerk/clerk-react"; | ||
import { Button } from "../ui/button"; | ||
import { usePathname } from "next/navigation"; | ||
import { useEffect, useState } from "react"; | ||
|
||
export function MainNav({ items }: NavBarProps) { | ||
const pathname = usePathname(); | ||
const [redirectUrl, setRedirectUrl] = useState(""); | ||
useEffect(() => { | ||
setRedirectUrl(window.location.host); | ||
}, []); | ||
return ( | ||
<nav | ||
className={"items-center space-x-4 lg:space-x-6"}> | ||
<nav className={"items-center space-x-4 lg:space-x-6"}> | ||
{items.map((item) => ( | ||
<NavbarItem key={`navbarItem-${item.content}`} item={item} /> | ||
))} | ||
<SignedOut> | ||
{process.env.NEXT_PUBLIC_SIGN_IN_URL ? ( | ||
<Button asChild variant="secondary"> | ||
<a | ||
href={`${process.env.NEXT_PUBLIC_SIGN_IN_URL}?redirect_url=https://${redirectUrl}`} | ||
> | ||
Ingresar | ||
</a> | ||
</Button> | ||
) : ( | ||
<SignInButton mode="modal" redirectUrl={pathname}> | ||
<Button variant="secondary">Ingresar</Button> | ||
</SignInButton> | ||
)} | ||
</SignedOut> | ||
<SignedIn> | ||
<SignOutButton> | ||
<Button variant={"link"} className="cursor-pointer"> | ||
Salir | ||
</Button> | ||
</SignOutButton> | ||
</SignedIn> | ||
</nav> | ||
); | ||
} |
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.