-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b3e8ad
commit 2915610
Showing
22 changed files
with
1,534 additions
and
248 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,20 @@ | ||
export const Footer = () => { | ||
return ( | ||
<footer className="footer flex flex-row bg-black text-white p-10"> | ||
<div className="footer-left flex flex-col"> | ||
<h1 className="title text-4xl font-black text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-600 border border-black rounded-lg">Unconditional.</h1> | ||
<ul className="flex gap-4"> | ||
<li>Github</li> | ||
<li>Twitter</li> | ||
<li>License</li> | ||
</ul> | ||
<p className="">© 2021 Unconditional. All rights reserved.</p> | ||
</div> | ||
<div className="footer-right m-auto text-6xl font-black text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-600 border border-black rounded-lg"> | ||
<p>Lorem ipsum footer</p> | ||
</div> | ||
</footer> | ||
) | ||
} | ||
|
||
export default Footer |
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,24 @@ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { ApiRequestOptions } from './ApiRequestOptions'; | ||
import type { ApiResult } from './ApiResult'; | ||
|
||
export class ApiError extends Error { | ||
public readonly url: string; | ||
public readonly status: number; | ||
public readonly statusText: string; | ||
public readonly body: any; | ||
public readonly request: ApiRequestOptions; | ||
|
||
constructor(request: ApiRequestOptions, response: ApiResult, message: string) { | ||
super(message); | ||
|
||
this.name = 'ApiError'; | ||
this.url = response.url; | ||
this.status = response.status; | ||
this.statusText = response.statusText; | ||
this.body = response.body; | ||
this.request = request; | ||
} | ||
} |
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,16 @@ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export type ApiRequestOptions = { | ||
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; | ||
readonly url: string; | ||
readonly path?: Record<string, any>; | ||
readonly cookies?: Record<string, any>; | ||
readonly headers?: Record<string, any>; | ||
readonly query?: Record<string, any>; | ||
readonly formData?: Record<string, any>; | ||
readonly body?: any; | ||
readonly mediaType?: string; | ||
readonly responseHeader?: string; | ||
readonly errors?: Record<number, string>; | ||
}; |
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,10 @@ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export type ApiResult = { | ||
readonly url: string; | ||
readonly ok: boolean; | ||
readonly status: number; | ||
readonly statusText: string; | ||
readonly body: any; | ||
}; |
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,128 @@ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export class CancelError extends Error { | ||
|
||
constructor(message: string) { | ||
super(message); | ||
this.name = 'CancelError'; | ||
} | ||
|
||
public get isCancelled(): boolean { | ||
return true; | ||
} | ||
} | ||
|
||
export interface OnCancel { | ||
readonly isResolved: boolean; | ||
readonly isRejected: boolean; | ||
readonly isCancelled: boolean; | ||
|
||
(cancelHandler: () => void): void; | ||
} | ||
|
||
export class CancelablePromise<T> implements Promise<T> { | ||
readonly [Symbol.toStringTag]!: string; | ||
|
||
private _isResolved: boolean; | ||
private _isRejected: boolean; | ||
private _isCancelled: boolean; | ||
private readonly _cancelHandlers: (() => void)[]; | ||
private readonly _promise: Promise<T>; | ||
private _resolve?: (value: T | PromiseLike<T>) => void; | ||
private _reject?: (reason?: any) => void; | ||
|
||
constructor( | ||
executor: ( | ||
resolve: (value: T | PromiseLike<T>) => void, | ||
reject: (reason?: any) => void, | ||
onCancel: OnCancel | ||
) => void | ||
) { | ||
this._isResolved = false; | ||
this._isRejected = false; | ||
this._isCancelled = false; | ||
this._cancelHandlers = []; | ||
this._promise = new Promise<T>((resolve, reject) => { | ||
this._resolve = resolve; | ||
this._reject = reject; | ||
|
||
const onResolve = (value: T | PromiseLike<T>): void => { | ||
if (this._isResolved || this._isRejected || this._isCancelled) { | ||
return; | ||
} | ||
this._isResolved = true; | ||
this._resolve?.(value); | ||
}; | ||
|
||
const onReject = (reason?: any): void => { | ||
if (this._isResolved || this._isRejected || this._isCancelled) { | ||
return; | ||
} | ||
this._isRejected = true; | ||
this._reject?.(reason); | ||
}; | ||
|
||
const onCancel = (cancelHandler: () => void): void => { | ||
if (this._isResolved || this._isRejected || this._isCancelled) { | ||
return; | ||
} | ||
this._cancelHandlers.push(cancelHandler); | ||
}; | ||
|
||
Object.defineProperty(onCancel, 'isResolved', { | ||
get: (): boolean => this._isResolved, | ||
}); | ||
|
||
Object.defineProperty(onCancel, 'isRejected', { | ||
get: (): boolean => this._isRejected, | ||
}); | ||
|
||
Object.defineProperty(onCancel, 'isCancelled', { | ||
get: (): boolean => this._isCancelled, | ||
}); | ||
|
||
return executor(onResolve, onReject, onCancel as OnCancel); | ||
}); | ||
} | ||
|
||
public then<TResult1 = T, TResult2 = never>( | ||
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, | ||
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | ||
): Promise<TResult1 | TResult2> { | ||
return this._promise.then(onFulfilled, onRejected); | ||
} | ||
|
||
public catch<TResult = never>( | ||
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | ||
): Promise<T | TResult> { | ||
return this._promise.catch(onRejected); | ||
} | ||
|
||
public finally(onFinally?: (() => void) | null): Promise<T> { | ||
return this._promise.finally(onFinally); | ||
} | ||
|
||
public cancel(): void { | ||
if (this._isResolved || this._isRejected || this._isCancelled) { | ||
return; | ||
} | ||
this._isCancelled = true; | ||
if (this._cancelHandlers.length) { | ||
try { | ||
for (const cancelHandler of this._cancelHandlers) { | ||
cancelHandler(); | ||
} | ||
} catch (error) { | ||
console.warn('Cancellation threw an error', error); | ||
return; | ||
} | ||
} | ||
this._cancelHandlers.length = 0; | ||
this._reject?.(new CancelError('Request aborted')); | ||
} | ||
|
||
public get isCancelled(): boolean { | ||
return this._isCancelled; | ||
} | ||
} |
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,31 @@ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { ApiRequestOptions } from './ApiRequestOptions'; | ||
|
||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>; | ||
type Headers = Record<string, string>; | ||
|
||
export type OpenAPIConfig = { | ||
BASE: string; | ||
VERSION: string; | ||
WITH_CREDENTIALS: boolean; | ||
CREDENTIALS: 'include' | 'omit' | 'same-origin'; | ||
TOKEN?: string | Resolver<string>; | ||
USERNAME?: string | Resolver<string>; | ||
PASSWORD?: string | Resolver<string>; | ||
HEADERS?: Headers | Resolver<Headers>; | ||
ENCODE_PATH?: (path: string) => string; | ||
}; | ||
|
||
export const OpenAPI: OpenAPIConfig = { | ||
BASE: process.env.IT_APP_API_BASE || 'http://localhost:8080', | ||
VERSION: '1.0', | ||
WITH_CREDENTIALS: false, | ||
CREDENTIALS: 'include', | ||
TOKEN: undefined, | ||
USERNAME: undefined, | ||
PASSWORD: undefined, | ||
HEADERS: undefined, | ||
ENCODE_PATH: undefined, | ||
}; |
Oops, something went wrong.