Skip to content

Commit

Permalink
🔨 chore: bump deps (#1200)
Browse files Browse the repository at this point in the history
* 🔨 chore: bump deps

* 🔨 chore: bump deps

* 🔨 chore: update links

* 🔨 fix lint
  • Loading branch information
casperiv0 authored Oct 30, 2022
1 parent d234c6d commit df3eb34
Show file tree
Hide file tree
Showing 43 changed files with 538 additions and 383 deletions.
33 changes: 17 additions & 16 deletions apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@casper124578/use-socket.io": "4.1.3",
"@casper124578/useful": "^2.0.5",
"@headlessui/react": "^1.7.3",
"@next/bundle-analyzer": "^12.3.1",
"@next/bundle-analyzer": "^13.0.0",
"@radix-ui/react-accordion": "^1.0.1",
"@radix-ui/react-context-menu": "^2.0.1",
"@radix-ui/react-dropdown-menu": "^2.0.1",
Expand All @@ -33,8 +33,8 @@
"@react-aria/interactions": "^3.12.0",
"@react-aria/label": "^3.4.2",
"@react-aria/ssr": "^3.3.0",
"@sentry/nextjs": "^7.16.0",
"@sentry/tracing": "^7.16.0",
"@sentry/nextjs": "^7.17.2",
"@sentry/tracing": "^7.17.2",
"@snailycad/config": "1.29.2",
"@snailycad/permissions": "1.29.2",
"@snailycad/schemas": "1.29.2",
Expand All @@ -43,36 +43,37 @@
"@snailycad/utils": "1.29.2",
"@tailwindcss/typography": "^0.5.7",
"@tanstack/match-sorter-utils": "^8.5.14",
"@tanstack/react-table": "^8.5.15",
"@tanstack/react-table": "^8.5.21",
"@tanstack/react-virtual": "^3.0.0-alpha.0",
"@tanstack/virtual-core": "^3.0.0-alpha.1",
"axios": "^1.1.3",
"bignumber.js": "^9.1.0",
"date-fns": "^2.29.3",
"eslint-config-next": "latest",
"formik": "^2.2.9",
"hex-color-regex": "^1.1.0",
"is-hotkey": "^0.2.0",
"is-mobile": "^3.1.1",
"leaflet": "^1.9.2",
"mdast-util-find-and-replace": "^2.2.1",
"next": "^12.3.1",
"next-intl": "2.8.0",
"next": "latest",
"next-intl": "2.9.0",
"nookies": "^2.5.2",
"pretty-bytes": "^6.0.0",
"react": "^18.2.0",
"react": "latest",
"react-bootstrap-icons": "^1.9.1",
"react-colorful": "^5.6.1",
"react-cool-onclickoutside": "^1.7.0",
"react-cropper": "^2.1.8",
"react-digit-input": "^2.1.0",
"react-dnd": "16.0.1",
"react-dnd-html5-backend": "16.0.1",
"react-dom": "^18.2.0",
"react-dom": "latest",
"react-google-recaptcha-v3": "^1.10.0",
"react-hot-toast": "^2.4.0",
"react-leaflet": "^4.1.0",
"react-markdown": "^8.0.3",
"react-select": "^5.5.4",
"react-select": "^5.5.7",
"react-sortablejs": "^6.1.4",
"react-use": "^17.4.0",
"remark-emoji": "^3.0.2",
Expand All @@ -83,24 +84,24 @@
"slate-react": "^0.83.2",
"socket.io-client": "^4.5.3",
"sortablejs": "^1.15.0",
"use-intl": "^2.8.0",
"use-intl": "^2.9.0",
"uuid": "^9.0.0",
"zod": "^3.19.1",
"zustand": "^4.1.2"
"zustand": "^4.1.3"
},
"devDependencies": {
"@types/leaflet": "^1.9.0",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.8",
"@types/sortablejs": "^1.15.0",
"@types/uuid": "^8.3.4",
"autoprefixer": "^10.4.12",
"autoprefixer": "^10.4.13",
"postcss": "^8.4.18",
"rimraf": "^3.0.2",
"sass": "^1.55.0",
"tailwindcss": "^3.2.0",
"tailwindcss": "^3.2.1",
"typescript": "^4.8.4",
"vite": "^3.1.8",
"vite": "^3.2.1",
"vitest": "^0.24.3"
}
}
30 changes: 16 additions & 14 deletions apps/client/src/components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,24 @@ Dropdown.Item = function DropdownItem({ children, ...rest }: Omit<ButtonProps, "
);
};

Dropdown.LinkItem = function LinkItem({ children, ...rest }: JSX.IntrinsicElements["a"]) {
Dropdown.LinkItem = function LinkItem({
children,
...rest
}: Omit<JSX.IntrinsicElements["a"], "ref">) {
return (
<DropdownMenu.Item className="hover:outline-none">
<Link href={rest.href!}>
<a
className={classNames(
"outline-none block rounded-md transition-colors w-full text-left bg-transparent",
"dark:hover:bg-secondary hover:bg-gray-400 focus:bg-gray-400 dark:focus:bg-secondary",
buttonSizes.sm,
buttonVariants.transparent,
rest.className,
)}
{...rest}
>
{children}
</a>
<Link
{...rest}
className={classNames(
"outline-none block rounded-md transition-colors w-full text-left bg-transparent",
"dark:hover:bg-secondary hover:bg-gray-400 focus:bg-gray-400 dark:focus:bg-secondary",
buttonSizes.sm,
buttonVariants.transparent,
rest.className,
)}
href={rest.href!}
>
{children}
</Link>
</DropdownMenu.Item>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useImageUrl } from "hooks/useImageUrl";
import { useSSRSafeId } from "@react-aria/ssr";
import type { NameSearchResult } from "state/search/nameSearchState";
import type { PostBolosData, PutBolosData } from "@snailycad/types/api";
import Image from "next/future/image";
import Image from "next/image";

interface Props {
onClose?(): void;
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/components/admin/AdminLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import type * as React from "react";
import { Nav } from "components/nav/Nav";
import { useRoleplayStopped } from "hooks/global/useRoleplayStopped";
import { classNames } from "lib/classNames";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,11 @@ export function AllCitizensTab({ citizens: initialData, totalCount, setCitizens
actions: (
<>
{hasPermissions([Permissions.ManageCitizens], true) ? (
<Link href={`/admin/manage/citizens/${citizen.id}`}>
<a
href={`/admin/manage/citizens/${citizen.id}`}
className={classNames(buttonVariants.success, "p-0.5 px-2 rounded-md")}
>
{common("edit")}
</a>
<Link
href={`/admin/manage/citizens/${citizen.id}`}
className={classNames(buttonVariants.success, "p-0.5 px-2 rounded-md")}
>
{common("edit")}
</Link>
) : null}
{hasPermissions([Permissions.DeleteCitizens], true) ? (
Expand Down
13 changes: 5 additions & 8 deletions apps/client/src/components/admin/manage/units/CallsignsTab.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react";
import type { Unit } from "src/pages/admin/manage/units";
import Link from "next/link";
import { formatOfficerDepartment, makeUnitName } from "lib/utils";
Expand Down Expand Up @@ -52,13 +51,11 @@ export function CallsignsTab({ search, units }: Props) {
unit: LABELS[unit.type],
name: makeUnitName(unit),
user: hasViewUsersPermissions ? (
<Link href={`/admin/manage/users/${unit.userId}`}>
<a
href={`/admin/manage/users/${unit.userId}`}
className={`rounded-md transition-all p-1 px-1.5 ${buttonVariants.default}`}
>
{unit.user.username}
</a>
<Link
href={`/admin/manage/users/${unit.userId}`}
className={`rounded-md transition-all p-1 px-1.5 ${buttonVariants.default}`}
>
{unit.user.username}
</Link>
) : (
unit.user.username
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react";
import type { Unit } from "src/pages/admin/manage/units";
import useFetch from "lib/useFetch";
import { formatUnitDivisions, makeUnitName, formatOfficerDepartment } from "lib/utils";
Expand Down Expand Up @@ -70,13 +69,11 @@ export function DepartmentWhitelistingTab({ search, pendingOfficers }: Props) {
department: formatOfficerDepartment(officer) ?? common("none"),
division: formatUnitDivisions(officer),
user: hasViewUsersPermissions ? (
<Link href={`/admin/manage/users/${officer.userId}`}>
<a
href={`/admin/manage/users/${officer.userId}`}
className={`rounded-md transition-all p-1 px-1.5 ${buttonVariants.default}`}
>
{officer.user.username}
</a>
<Link
href={`/admin/manage/users/${officer.userId}`}
className={`rounded-md transition-all p-1 px-1.5 ${buttonVariants.default}`}
>
{officer.user.username}
</Link>
) : (
officer.user.username
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { UnitQualification } from "@snailycad/types";
import { HoverCard } from "components/shared/HoverCard";
import { useImageUrl } from "hooks/useImageUrl";
import Image from "next/future/image";
import Image from "next/image";

interface Props {
qualification: UnitQualification;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react";
import type { Unit } from "src/pages/admin/manage/units";
import Link from "next/link";
import {
Expand Down Expand Up @@ -136,13 +135,11 @@ export function AllUnitsTab({ search, units }: Props) {
unit: LABELS[unit.type],
name: makeUnitName(unit),
user: hasViewUsersPermissions ? (
<Link href={`/admin/manage/users/${unit.userId}`}>
<a
href={`/admin/manage/users/${unit.userId}`}
className={`rounded-md transition-all p-1 px-1.5 ${buttonVariants.default}`}
>
{unit.user.username}
</a>
<Link
href={`/admin/manage/users/${unit.userId}`}
className={`rounded-md transition-all p-1 px-1.5 ${buttonVariants.default}`}
>
{unit.user.username}
</Link>
) : (
unit.user.username
Expand All @@ -161,13 +158,11 @@ export function AllUnitsTab({ search, units }: Props) {
actions: (
<>
{hasManagePermissions ? (
<Link href={`/admin/manage/units/${unit.id}`}>
<a
href={`/admin/manage/units/${unit.id}`}
className={classNames("p-0.5 px-2 rounded-md", buttonVariants.success)}
>
{common("manage")}
</a>
<Link
href={`/admin/manage/units/${unit.id}`}
className={classNames("p-0.5 px-2 rounded-md", buttonVariants.success)}
>
{common("manage")}
</Link>
) : null}
{hasDeletePermissions ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,11 @@ export function ManageUnitTab({ unit: data }: Props) {
</FormField>

<footer className="flex justify-end">
<Link href="/admin/manage/units">
<a
href="/admin/manage/units"
className={classNames(buttonVariants.cancel, "p-1 px-4 rounded-md")}
>
{common("cancel")}
</a>
<Link
href="/admin/manage/units"
className={classNames(buttonVariants.cancel, "p-1 px-4 rounded-md")}
>
{common("cancel")}
</Link>

<Button type="submit" className="flex items-center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react";
import { useTranslations } from "use-intl";
import Link from "next/link";
import { Rank } from "@snailycad/types";
Expand Down Expand Up @@ -93,13 +92,11 @@ export function AllUsersTab({ users, totalCount }: GetManageUsersData) {
<Status state={user.whitelistStatus}>{user.whitelistStatus.toLowerCase()}</Status>
),
actions: (
<Link href={`/admin/manage/users/${user.id}`}>
<a
className={classNames(buttonVariants.default, "p-0.5 px-2 rounded-md")}
href={`/admin/manage/users/${user.id}`}
>
{common("manage")}
</a>
<Link
className={classNames(buttonVariants.default, "p-0.5 px-2 rounded-md")}
href={`/admin/manage/users/${user.id}`}
>
{common("manage")}
</Link>
),
};
Expand Down
13 changes: 5 additions & 8 deletions apps/client/src/components/auth/login/LoginForm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react";
import { Form, Formik, FormikHelpers } from "formik";
import Link from "next/link";
import { Discord, Steam } from "react-bootstrap-icons";
Expand Down Expand Up @@ -122,13 +121,11 @@ export function LoginForm({ onFormSubmitted, isWithinModal }: Props) {
<h1 className="text-3xl font-bold text-gray-800 dark:text-white">{t("login")}</h1>

{ALLOW_REGULAR_LOGIN && !isWithinModal ? (
<Link href="/auth/register">
<a
href="/auth/register"
className="inline-block mt-2 underline text-neutral-700 dark:text-gray-200"
>
{t("noAccount")}
</a>
<Link
href="/auth/register"
className="inline-block mt-2 underline text-neutral-700 dark:text-gray-200"
>
{t("noAccount")}
</Link>
) : null}
</header>
Expand Down
8 changes: 3 additions & 5 deletions apps/client/src/components/business/BusinessCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ export function BusinessCard({ employee }: Props) {
</div>

<Link href={isDisabled ? "#" : `/business/${employee.businessId}/${employee.id}`}>
<a href={isDisabled ? "#" : `/business/${employee.businessId}/${employee.id}`}>
<Button title={disabledMessage} disabled={isDisabled}>
{common("view")}
</Button>
</a>
<Button title={disabledMessage} disabled={isDisabled}>
{common("view")}
</Button>
</Link>
</li>
);
Expand Down
6 changes: 2 additions & 4 deletions apps/client/src/components/citizen/ManageCitizenForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,8 @@ export function ManageCitizenForm({
) : null}

<div className="flex items-center justify-end">
<Link href={citizen ? cancelURL : "/citizen"}>
<a href={citizen ? cancelURL : "/citizen"} className="mr-2 underline">
{common("cancel")}
</a>
<Link href={citizen ? cancelURL : "/citizen"} className="mr-2 underline">
{common("cancel")}
</Link>

<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useFeatureEnabled } from "hooks/useFeatureEnabled";
import { useImageUrl } from "hooks/useImageUrl";
import { usePermission } from "hooks/usePermission";
import { useTranslations } from "next-intl";
import Image from "next/future/image";
import Image from "next/image";
import Link from "next/link";
import { PersonFill } from "react-bootstrap-icons";

Expand Down Expand Up @@ -59,13 +59,11 @@ export function CitizenListItem({ citizen }: Props) {
</div>
</div>

<Link href={`/citizen/${citizen.id}`}>
<a
href={`/citizen/${citizen.id}`}
className={`rounded-md transition-all p-1 px-3 ${buttonVariants.default}`}
>
{t("viewCitizen")}
</a>
<Link
href={`/citizen/${citizen.id}`}
className={`rounded-md transition-all p-1 px-3 ${buttonVariants.default}`}
>
{t("viewCitizen")}
</Link>
</li>
);
Expand Down
Loading

0 comments on commit df3eb34

Please sign in to comment.