Add offline transfer history and mobile app support
This commit is contained in:
10
front/src/lib/app-shell.test.ts
Normal file
10
front/src/lib/app-shell.test.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
|
||||
import { MOBILE_APP_MAX_WIDTH, shouldUseMobileApp } from './app-shell';
|
||||
|
||||
test('shouldUseMobileApp enables the mobile shell below the width breakpoint', () => {
|
||||
assert.equal(shouldUseMobileApp(MOBILE_APP_MAX_WIDTH - 1), true);
|
||||
assert.equal(shouldUseMobileApp(MOBILE_APP_MAX_WIDTH), false);
|
||||
assert.equal(shouldUseMobileApp(1280), false);
|
||||
});
|
||||
5
front/src/lib/app-shell.ts
Normal file
5
front/src/lib/app-shell.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export const MOBILE_APP_MAX_WIDTH = 768;
|
||||
|
||||
export function shouldUseMobileApp(width: number) {
|
||||
return width < MOBILE_APP_MAX_WIDTH;
|
||||
}
|
||||
Reference in New Issue
Block a user