Skip to content
Snippets Groups Projects
Commit 7c07d289 authored by Yusuf Akgül's avatar Yusuf Akgül :hatching_chick:
Browse files

remove mui and change to tailwindcss, npm build throws error though

parent 1e94febc
No related branches found
No related tags found
1 merge request!4Change mui to tailwindcss
Pipeline #34234 passed
import { ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
// tailwindcss classnames generator from shadcn
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
const IGDB_IMG_BASE_URL = process.env.IGDB_IMG_BASE_URL ?? ''
// changes the default size of the image to be fetched
export function getImageURL(hashId: string, size: string): string {
return `${IGDB_IMG_BASE_URL}/t_${size}_2x/${hashId}.jpg`
return `${IGDB_IMG_BASE_URL}/t_${size}_2x/${hashId}.jpg`
}
// returns the base url for the current environment, even considering current port
export function getBaseURL(): string {
return process.env.NODE_ENV === 'production'
? process.env.PROD_URL ?? ''
: (typeof window !== 'undefined'
? `http://${window.location.hostname}:${window.location.port}`
: 'http://localhost:3000')
return process.env.NODE_ENV === 'production'
? process.env.PROD_URL ?? ''
: (typeof window !== 'undefined'
? `http://${window.location.hostname}:${window.location.port}`
: 'http://localhost:3000')
}
// calculates the offset for the query
export function calculateOffset(page: number, limit: number): number {
return (page - 1) * limit
return (page - 1) * limit
}
\ No newline at end of file
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
domains: ["images.igdb.com"]
}
images: {
domains: ["images.igdb.com"]
}
}
module.exports = nextConfig
This diff is collapsed.
{
"name": "project_ss23_gameunity",
"version": "0.1.0",
"version": "0.2.0",
"private": true,
"scripts": {
"dev": "next dev",
"turbo": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"preview": "next build && next start"
},
"dependencies": {
"@clerk/nextjs": "^4.18.2",
"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.13.1",
"@prisma/client": "^4.14.1",
"@radix-ui/react-dropdown-menu": "^2.0.4",
"@radix-ui/react-slot": "^1.0.1",
"@tanstack/react-query": "^4.29.7",
"class-variance-authority": "^0.6.0",
"clsx": "^1.2.1",
"lucide-react": "^0.220.0",
"next": "13.4.3",
"next-themes": "^0.2.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-infinite-scroll-component": "^6.1.0",
"react-query": "^3.39.3"
"tailwind-merge": "^1.12.0",
"tailwindcss-animate": "^1.0.5"
},
"devDependencies": {
"@types/node": "^20.2.1",
"@tanstack/eslint-plugin-query": "^4.29.9",
"@types/node": "^20.2.3",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"autoprefixer": "10.4.14",
"eslint": "^8.41.0",
"eslint-config-next": "^13.4.3",
"postcss": "8.4.23",
"prisma": "^4.14.1",
"tailwindcss": "3.3.2",
"typescript": "^5.0.4"
}
}
\ No newline at end of file
}
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
-- CreateTable
CREATE TABLE "Message" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"author" TEXT,
"gameId" TEXT,
"title" TEXT,
"content" TEXT NOT NULL,
"sentAt" DATETIME DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME
);
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18.2756 22.8622H9.13782V30C9.13782 31.1046 10.0332 32 11.1378 32H16.2756C17.3802 32 18.2756 31.1046 18.2756 30V22.8622Z" fill="black"/>
<path d="M18.2934 22.8622L13.7067 18.2934L9.13782 22.8622H18.2934Z" fill="black"/>
<path d="M20.8444 0H15.7067C14.6021 0 13.7067 0.895431 13.7067 2V9.13785H22.8444V2C22.8444 0.89543 21.949 0 20.8444 0Z" fill="black"/>
<path d="M13.7067 9.15555L18.2933 13.7245L22.8622 9.15555H13.7067Z" fill="black"/>
<path d="M9.13776 9.15555H2C0.89543 9.15555 0 10.051 0 11.1555V16.2934C0 17.398 0.895432 18.2934 2 18.2934H9.13776V9.15555Z" fill="#8E4CC2"/>
<path d="M9.13782 18.2934L13.7067 13.7245L9.13782 9.15555V18.2934Z" fill="#8E4CC2"/>
<path d="M29.9999 13.7245H22.8622V22.8622H29.9999C31.1045 22.8622 31.9999 21.9667 31.9999 20.8622V15.7245C31.9999 14.6199 31.1045 13.7245 29.9999 13.7245Z" fill="black"/>
<path d="M22.8623 13.7245L18.2933 18.2934L22.8623 22.8622V13.7245Z" fill="black"/>
</svg>
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ["class"],
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
],
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
keyframes: {
"accordion-down": {
from: { height: 0 },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: 0 },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate")],
}
\ No newline at end of file
File moved
import { Icons } from "@/components/icons"
import type { Icon } from "lucide-react"
export type NavItem = {
title: string
href: string
disabled?: boolean
}
export type MainNavItem = NavItem
export type SidebarNavItem = {
title: string
disabled?: boolean
external?: boolean
icon?: keyof typeof Icons
} & (
| {
href: string
items?: never
}
| {
href?: string
items: NavLink[]
}
)
export type SiteConfig = {
name: string
description: string
url: string
ogImage: string
}
export type DashboardConfig = {
sidebarNav: SidebarNavItem[]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment