add basic player page
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
This commit is contained in:
6
src/common/utils.ts
Normal file
6
src/common/utils.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { type ClassValue, clsx } from "clsx"
|
||||
import { twMerge } from "tailwind-merge"
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
18
src/common/web-request.ts
Normal file
18
src/common/web-request.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { API_ENDPOINT } from "@/consts";
|
||||
import axios from "axios";
|
||||
|
||||
export default class WebRequest {
|
||||
private API_ENDPOINT: string = API_ENDPOINT;
|
||||
|
||||
/**
|
||||
* Gets a response from the server
|
||||
*
|
||||
* @param endpoint the endpoint to send the request to
|
||||
* @returns the response from the server
|
||||
*/
|
||||
public static get(endpoint: string) {
|
||||
return axios.get(API_ENDPOINT + endpoint, {
|
||||
validateStatus: () => true, // Do not throw an error on non-200 status codes
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user