[go: nahoru, domu]

Skip to content

Commit

Permalink
New custom domain added.
Browse files Browse the repository at this point in the history
Some small frontend bug fixes
  • Loading branch information
mohsen-ameli committed Jun 3, 2023
1 parent 80d4d8a commit e534fcd
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 24 deletions.
21 changes: 10 additions & 11 deletions backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
DEBUG = str(os.environ.get("DEBUG")) == "1"

ALLOWED_HOSTS = [
"3d-backgammon.up.railway.app",
"www.3d-backgammon.up.railway.app",
"www.3d-backgammon.com",
"3d-backgammon.com",
"backend.3dbackgammon.com",
"www.backend.3dbackgammon.com",
"www.3dbackgammon.com",
"3dbackgammon.com",
"localhost",
"127.0.0.1",
]
Expand Down Expand Up @@ -227,16 +227,15 @@
'http://localhost:5173',
'http://192.168.0.173:3000',
'http://192.168.0.173:5173',
'https://www.3d-backgammon.com',
'https://3d-backgammon.up.railway.app',
'https://railway.app',
'https://3d-backgammon.vercel.app'
'https://backend.3dbackgammon.com',
'https://www.3dbackgammon.com',
'https://3dbackgammon.com'
]

CSRF_TRUSTED_ORIGINS = [
'https://www.3d-backgammon.com',
'https://3d-backgammon.com',
'https://3d-backgammon.up.railway.app',
'https://www.3dbackgammon.com',
'https://3dbackgammon.com',
'https://backend.3dbackgammon.com',
]

CORS_ALLOW_CREDENTIALS = True
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion frontend/app/friends/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React, { useRef, useState } from "react"
import AddButton from "./AddButton"
import { useSession } from "next-auth/react"
import { redirect } from "next/navigation"
import { search, sendFriendRequest } from "./ServerActions"
import { search, sendFriendRequest } from "./actions"
import Header from "@/components/ui/Header"

export default function SearchPage() {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/game/[uuid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { GameDataTypes } from "@/game/types/Game.type"
import switchPlayers from "@/game/utils/SwitchPlayers"
import { useSession } from "next-auth/react"
import { useRouter } from "next/navigation"
import { useCallback, useEffect, useState } from "react"
import { useEffect, useState } from "react"

type DataType = { data: { valid: boolean; finished: boolean } }

Expand Down
1 change: 0 additions & 1 deletion frontend/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import dynamic from "next/dynamic"
import "@fortawesome/fontawesome-svg-core/styles.css"
import { config } from "@fortawesome/fontawesome-svg-core"
import FakeLoader from "@/components/ui/FakeLoader"
// import Loader from "@/components/ui/Loader"

// Adding font awesome everywhere
config.autoAddCss = false
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function Head({ title, description }: HeadProps) {
{/* Meta Tags for HTML pages on Mobile */}
{/* <meta name="format-detection" content="telephone=yes"/>
<meta name="HandheldFriendly" content="true"/> */}
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<meta name="theme-color" content="#000" />
<link rel="shortcut icon" href="/icons/apple-touch-icon.png" />

Expand Down
6 changes: 1 addition & 5 deletions frontend/src/components/utils/getServerUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@
* @returns A string that is the url to be hit
*/
export default function getServerUrl(http: boolean = true) {
if (process.env.NODE_ENV === "development") {
return http ? "http://localhost:8000" : "ws://localhost:8000"
} else {
return http ? "https://3d-backgammon.up.railway.app" : "wss://3d-backgammon.up.railway.app"
}
return http ? process.env.NEXT_PUBLIC_HTTP_SERVER! : process.env.NEXT_PUBLIC_WS_SERVER!
}
9 changes: 6 additions & 3 deletions frontend/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
module.exports = {
mode: 'jit',
content: ['./app/**/*.{js,ts,jsx,tsx}', './src/**/*.{js,ts,jsx,tsx}'], // remove unused styles in production
darkMode: 'media', // or 'media' or 'class'
mode: "jit",
content: ["./app/**/*.{js,ts,jsx,tsx}", "./src/**/*.{js,ts,jsx,tsx}"], // remove unused styles in production
darkMode: "media", // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
future: {
hoverOnlyWhenSupported: true,
},
}
31 changes: 30 additions & 1 deletion vite/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
{
"peacock.remoteColor": "#42b883",
"files.exclude": {
"**/.git": false,
"**/.svn": false,
"**/.hg": false,
"**/CVS": false,
"**/.DS_Store": false,
"**/Thumbs.db": false,
"**/*.git": false,
".env": false,
".gitignore": false,
".prettierrc": false,
"file.d.ts": false,
"package-lock.json": false,
"README": false,
"tsconfig.json": false,
"tsconfig.node.json": false,
"vercel.json": false,
"vite.config.ts": false,
"postcss.config.cjs": false,
"**/.vercel": false,
".vercel": false,
"**/.vscode": false,
".vscode": false,
"**/dist": false,
"dist": false,
"**/node_modules": false,
"node_modules": false,
"tailwind.config.cjs": false,
"yarn.lock": false
},
"explorerExclude.backup": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
Expand Down Expand Up @@ -30,7 +60,6 @@
"tailwind.config.cjs": true,
"yarn.lock": true
},
"explorerExclude.backup": {},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
Expand Down

1 comment on commit e534fcd

@vercel
Copy link
@vercel vercel bot commented on e534fcd Jun 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.